varying vec3 normal;
varying vec3 light0;
varying vec3 halfVector0;
varying vec3 light1;
varying vec3 halfVector1;

void main(void)
{
	vec4 eyeSpacePosition = gl_ModelViewMatrix * gl_Vertex;
	normal = normalize(gl_NormalMatrix * gl_Normal);
	gl_TexCoord[0] = gl_MultiTexCoord0;
	gl_TexCoord[1] = gl_TextureMatrix[1] * eyeSpacePosition;
	gl_TexCoord[2] = gl_TextureMatrix[2] * eyeSpacePosition; 

	light0 = vec3(gl_LightSource[0].position - eyeSpacePosition);
	halfVector0 = normalize(gl_LightSource[0].halfVector.xyz);

	light1 = vec3(gl_LightSource[1].position - eyeSpacePosition);
	halfVector1 = normalize(gl_LightSource[1].halfVector.xyz);

	gl_Position = ftransform();
}
